﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bai1
{
    class Program
    {
        static void Main(string[] args)
        {
            point2D point2D = new point2D();
            Console.WriteLine("\t\tNHAP TOA DO DIEM A ");
            Console.WriteLine();
            point2D.nhap();
            Console.WriteLine("\t\tHIEN THI ");
            Console.WriteLine();
            point2D.hienthi();
            Console.WriteLine();
            Console.WriteLine("NHAN PHIM BAT KI DE THOAT! ");
            Console.ReadKey();
        }
    }
    public class point2D
    {
        //dulieu
        private int x,y;
        //hanhvi
        public point2D()
        {
            x = 0;
            y = 0;
        }
        public point2D(int _x, int _y)
        {
            x = _x;
            y = _y;
        }
        public void set_x(int _x)
        {
            x = _x;
        }
        public void set_y(int _y)
        {
            y = _y;
        }
        public int get_x()
        {
            return x;
        }
        public int get_y()
        {
            return y;
        }
        public void nhap()
        {
            Console.Write("Nhap x: ");
            set_x(Convert.ToInt32(Console.ReadLine()));
            Console.Write("Nhap Y: ");
            set_y(Convert.ToInt32(Console.ReadLine()));
        }
        public void hienthi()
        {
            Console.WriteLine("Toa do diem A[{0},{1}]", get_x(), get_y());
        }
    }
}
